package controllers;


import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;


import myDaos.ProceduresDao;

@ManagedBean
@SessionScoped
public class ProcedureManagedBean {

private String param1;
private Integer param2;
private String param3;
private String param4;
@EJB
private ProceduresDao pd;
 



public String getParam1() {
	return param1;
}




public void setParam1(String param1) {
	this.param1 = param1;
}




public Integer getParam2() {
	return param2;
}




public void setParam2(Integer param2) {
	this.param2 = param2;
}




public String getParam3() {
	return param3;
}




public void setParam3(String param3) {
	this.param3 = param3;
}




public String getParam4() {
	return param4;
}




public void setParam4(String param4) {
	this.param4 = param4;
}

public void callProcedure(){
	if(param1.equals("")){
		param1=null;	
	}
	if(param2 != 0){
		param2=0;	
	}
	if(param3.equals("")){
		param3=null;	
	}
	if(param4.equals("")){
		param4=null;	
	}
	pd.callMyProcedure(param1, param2, param3,param4);
}

}
